home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1989 / 05 / make.doc < prev    next >
Text File  |  1989-08-18  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.                                                                CURSES Appendix B
  5.      ___________________________________________________________________________
  6.  
  7.             
  8.             
  9.             B.1 A Program Maintenance Tool
  10.             
  11.             A Unix like make program is provided with the Curses
  12.             package.  Although this is not a full implementation of
  13.             make, it works very similarly to the Unix version.  The
  14.             following features are supported:
  15.                  
  16.               Usage:  make [-B | -b] [target_name(s)]
  17.                  
  18.                  o the file with targets and instructions must be named
  19.                  makefile and be in the current working directory
  20.                  
  21.                  o if the -B (or -b) option is used, make will build a
  22.                  batch shell script to construct the target(s) desired
  23.                  (file placed in MK.BAT); useful if PC has too little
  24.                  RAM to spawn commands while make is executing
  25.                  
  26.                  o if a target is not given on the command line then the
  27.                  first target in makefile will be made
  28.                  
  29.                  o all characters after a # are considered comments
  30.                  
  31.                  o all dependencies are made first before the main
  32.                  targets
  33.                  
  34.                  o targets without dependencies will always be made
  35.                  
  36.                  o files whose suffixes are .c, .h, .cpp, .cxx, .hpp or
  37.                  .hxx do not need targets and will be considered up to
  38.                  date
  39.                  
  40.                  o there are up to eight (8) instructions per target
  41.                  allowed
  42.                  
  43.                  o instructions starting with the @ character will not
  44.                  be echoed to the screen before being performed
  45.                  
  46.                  o if errors are detected by the exit value (non-zero)
  47.                  of any instruction (except MS-DOS internal functions),
  48.                  make will stop execution and exit with the exit value
  49.                  of the instruction
  50.                  
  51.                  o each individual target group with instructions must
  52.                  be separated by at least one blank line
  53.                  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                              B-1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      CURSES Appendix B
  71.      ___________________________________________________________________________
  72.  
  73.             The makefile must follow this syntax:
  74.             
  75.                  [# comment]
  76.                  target1 : [dependency1 ...] [# comment]
  77.                       [instruction1] [# comment]
  78.                       [instruction2] [# comment]
  79.                       [instruction3] [# comment]
  80.                  
  81.                  target2 : [dependency1 ...] ...
  82.                  
  83.             The make utility does not currently support macros and
  84.             environment variables in dependency lines.  No batch shell
  85.             scripts may be run from make.  Also, no line may be sepa-
  86.             rated with a '\' character.  The following is a sample
  87.             makefile layout for a make-believe program:
  88.             
  89.                  # makefile for foo.exe - uses MSC 5.0
  90.                  
  91.                  foo.exe : foo.obj junk.obj scurses.lib
  92.                       cl foo junk -link scurses
  93.                  
  94.                  foo.obj : foo.c foo.h
  95.                       cl -c foo.c
  96.                  
  97.                  junk.obj : junk.asm
  98.                       masm junk;
  99.                  
  100.                  curses.lib :   # needed to resolve foo.exe : line
  101.                  
  102.                  junk.asm :   # needed to resolve junk.obj : line
  103.                  
  104.                  # not needed for null dependency targets for .c & .h
  105.                  # end of makefile
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.      B-2
  131.  
  132.  
  133.